﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="TeamList.aspx.cs" Inherits="SD.Web.Views.TeamMaintenance.TeamList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
    <h2>LIST TEAM</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="server">
    <div class="grid740 simplebox">
    <asp:UpdatePanel ID="UpdatePanelTeamList" runat="server">
        <ContentTemplate>
                <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
                    <div style="float: right; width: 261px; padding: 0px;">
                        <asp:Button CssClass="st-button" ID="ButtonDeactivate" runat="server" Text='In-Activate'
                            CommandName="active" CausesValidation="False" OnClick="ButtonDeactivate_Click"
                            Width="72px" />
                        <asp:Button CssClass="st-button" ID="ButtonSave" runat="server" Text="Save" OnClick="ButtonSave_Click"
                            UseSubmitBehavior="False" ValidationGroup="edit" Enabled="True" />
                        <asp:Button CssClass="st-button" ID="ButtonBack" runat="server" Text="Back" OnClick="ButtonBack_Click" />
                    </div>
                    <ul class="ui-tabs-nav ui-he">
                        <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">
                            Teams</a></li>
                    </ul>
                    <div class="clear">
                    </div>
                    <div class="titleh">
                        <h3 class="sorting_range">
                           <asp:LinkButton ID="linkButtonAll" CommandName="all" OnCommand="FilterByLetters_Command"
                            runat="server" >All</asp:LinkButton>
                        <asp:LinkButton ID="linkButton09" CommandName="09" OnCommand="FilterByLetters_Command"
                            runat="server">0-9</asp:LinkButton>
                        <asp:LinkButton ID="linkButtonAE" CommandName="ae" OnCommand="FilterByLetters_Command"
                            runat="server">A B C D E</asp:LinkButton>
                        <asp:LinkButton ID="linkButtonFJ" CommandName="fj" OnCommand="FilterByLetters_Command"
                            runat="server">F G H I J</asp:LinkButton>
                        <asp:LinkButton ID="linkButtonKN" CommandName="kn" OnCommand="FilterByLetters_Command"
                            runat="server">K L M N </asp:LinkButton>
                        <asp:LinkButton ID="linkButtonOR" CommandName="or" OnCommand="FilterByLetters_Command"
                            runat="server">O P Q R</asp:LinkButton>
                        <asp:LinkButton ID="linkButtonSV" CommandName="sv" OnCommand="FilterByLetters_Command"
                            runat="server">S T U V</asp:LinkButton>
                        <asp:LinkButton ID="linkButtonWZ" CommandName="wz" OnCommand="FilterByLetters_Command"
                            runat="server">W X Y Z</asp:LinkButton>
                            <span class="right">
                                <asp:LinkButton ID="CreateButton" runat="server" CssClass="hg-blue" OnClick="CreateButton_Click"
                                    Text="CREATE">
                                </asp:LinkButton>
                                &nbsp;
                                <asp:CheckBox ID="CheckBoxInactive" runat="server" Text="Include In-active" AutoPostBack="True"
                                    OnCheckedChanged="CheckBoxInactive_CheckedChanged" />
                            </span>
                        </h3>
                    </div>
                    <asp:GridView ID="GridViewTeam" CssClass="tablesorter" runat="server" AutoGenerateColumns="False"
                        AllowSorting="True"  onrowdatabound="GridViewTeam_RowDataBound"  OnSorting="GridViewTeam_Sorting">
                        <Columns>
                            <asp:TemplateField HeaderText="Team Name" SortExpression="TeamName">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButtonPROName" runat="server" CommandName='<%# Eval("TeamId") %>' OnCommand="LinkButtonPROName_Command"
                                        CommandArgument='<%#Eval("IsActive") %>' Text='<%# Eval("TeamName") %>' ></asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" Width="133px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Address Line 1" SortExpression="AddressLine">
                                <ItemTemplate>
                                    <%# Eval("Address.AddressLine")%>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Contact" SortExpression="KnownAs">
                                <ItemTemplate>
                                    <%# Eval("Contact.KnownAs")%>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="PostCode" SortExpression="Postcode">
                                <ItemTemplate>
                                    <%# Eval("Address.Postcode")%>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Is Active" SortExpression="IsActive">
                                <ItemTemplate>
                                    <asp:Label ID="ProgramIsActive" runat="server" Text='<%# (bool) Eval("IsActive") ? "Yes" : "No" %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Mode="NextPreviousFirstLast" />
                    </asp:GridView>
                    <table style="margin-top: 10px; margin-left: 10px;">
                        <tr style="line-height: 30px; padding: 20px 0;">
                            <% if (btnFirst.Visible == true)
                               { %>
                            <td style="background-color: #FFFFFF; color: 6C7D8C; vertical-align: top; word-wrap: break-word;">
                                <span style="background: url('img/simplebox-title-bg.png') repeat-x scroll center bottom transparent;
                                    border: 1px solid #D6D6D6; border-radius: 3px 3px 3px 3px; box-shadow: 0 1px 1px #EDEDED;
                                    color: #3E7CAC; padding: 8px 0 8px 0;">
                                    <asp:LinkButton ID="btnFirst" runat="server" OnClick="btnFirst_Click" Visible="false"
                                        Height="30px" Width="40px"><span style="font-size:14px; font-weight:bold; text-align:center; margin-left:12px;"><<</span></asp:LinkButton>
                                </span>
                            </td>
                            <%} %>
                            <% if (btnPrevious.Visible == true)
                               { %>
                            <td style="background-color: #FFFFFF; color: 6C7D8C; vertical-align: top; word-wrap: break-word;">
                                <span style="background: url('img/simplebox-title-bg.png') repeat-x scroll center bottom transparent;
                                    border: 1px solid #D6D6D6; border-radius: 3px 3px 3px 3px; box-shadow: 0 1px 1px #EDEDED;
                                    color: #3E7CAC; padding: 8px 0 8px 0;">
                                    <asp:LinkButton ID="btnPrevious" runat="server" OnClick="btnPrevious_Click" Height="30px"
                                        Width="30px"><span style="font-size:14px; font-weight:bold; text-align:center; margin-left:12px;"><</span></asp:LinkButton>
                                </span>
                            </td>
                            <%} %>
                            <% if (btnNext.Visible == true)
                               { %>
                            <td style="background-color: #FFFFFF; color: 6C7D8C; vertical-align: top; word-wrap: break-word;">
                                <span style="background: url('img/simplebox-title-bg.png') repeat-x scroll center bottom transparent;
                                    border: 1px solid #D6D6D6; border-radius: 3px 3px 3px 3px; box-shadow: 0 1px 1px #EDEDED;
                                    color: #3E7CAC; padding: 8px 0 8px 0;">
                                    <asp:LinkButton ID="btnNext" runat="server" OnClick="btnNext_Click" Height="30px"
                                        Width="30px"><span style="font-size:14px; font-weight:bold; text-align:center; margin-left:12px;">></span></asp:LinkButton>
                                </span>
                            </td>
                            <%} %>
                            <% if (btnLast.Visible == true)
                               { %>
                            <td style="background-color: #FFFFFF; color: 6C7D8C; vertical-align: top; word-wrap: break-word;">
                                <span style="background: url('img/simplebox-title-bg.png') repeat-x scroll center bottom transparent;
                                    border: 1px solid #D6D6D6; border-radius: 3px 3px 3px 3px; box-shadow: 0 1px 1px #EDEDED;
                                    color: #3E7CAC; padding: 8px 0 8px 0;">
                                    <asp:LinkButton ID="btnLast" runat="server" OnClick="btnLast_Click" Height="30px"
                                        Width="40px"><span style="font-size:14px; font-weight:bold; text-align:center; margin-left:12px;">>></span></asp:LinkButton>
                                </span>
                            </td>
                            <%} %>
                        </tr>
                    </table>
                </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </div>
</asp:Content>
